import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class Demo12 {
    public static void main(String[] args) throws IOException {
        try(Reader reader = new FileReader("./text")){
            char[] buffer = new char[1024];
            int n = reader.read(buffer);
            System.out.println(n);
            for (int i = 0; i < n; i++) {
                System.out.println(buffer[i]);
            }
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
